<template>
    <div class='tagcloud clearfix'>
        <a href="javascript:void(0)" class="color1" v-for='i in arr' :key='i.key' :style='i.color' :data-bg='i.color' @click="allArticle('Tips-article-' + i.name)">{{i.name}}</a>
    </div>
</template>
<script>
import devCof from '@/conf/dev.conf.js'
export default {
  data () {
    return {
      arr1: devCof.tips
    }
  },
  computed: {
    arr () {
      return this.$store.getters.getTips
    }
  },
  methods: {
    allArticle (arg) {
      this.$router.push('/index')
      this.$store.dispatch('setRigthPage', arg)
    }
  },
  mounted () {
    // this.$store.dispatch('getTips')
  }
}
</script>
<style scoped>
.tagcloud a:before {
    content: " ";
    width: 0px;
    height: 0px;
    position: absolute;
    top: 0;
    left: -10px;
    border: 9px solid #fff;
    border-right-color: transparent;
}
.tagcloud a:after {
    content: " ";
    width: 4px;
    height: 4px;
    background-color: #fff;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.3);
    box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.3);
    position: absolute;
    top: 7px;
    left: 10px;
}
.tagcloud a {
    display: inline-block;
    text-decoration: none;
    font-weight: normal;
    font-size: 12px;
    color: #fff;
    height: 18px;
    line-height: 18px;
    background: #ddd;
    float: left;
    padding: 0 5px 0px 20px;
    position: relative;
    left: 5px;
    -webkit-border-radius: 0 5px 5px 0;
    border-radius: 0 5px 5px 0;
    margin: 5px 9px 5px 8px;
    font-family: monaco, menlo, consolas, 'courier new', courier, monospace;
}
a {
    text-decoration: none;
    outline-width: 0;
    color: #258fb8;
    outline: none;
    transition:1s all ease;
}
@media screen and (max-width: 800px) {
  .tagcloud a:before {
    content: " ";
    width: 0px;
    height: 0px;
    position: absolute;
    top: -2px;
    left: -10px;
    border: 11px solid #fff;
    border-right-color: transparent;
}
}
</style>
